<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">

$(document).ready(function(){
	
});

//다음단계
function sendData(){
	if($("#same_user:checked").length!=1){
		alert("입금자명과 예약자명은 동일해야합니다. 체크확인해주세요");
		$("#same_user").focus();
		return false;
	}

	if($.trim($("#reservation_nm").val())==''){
		alert("예약자는 필수입력항목입니다");
		$("#reservation_nm").focus();
		return false;
	}
	
	$("#frmdata").submit();
}

function ck_same_user(){
	$("#send_bank_nm").val($("#reservation_nm").val());
}

// 이메일 넣기
function changeEmail(val){
	if($(val).val()==''){
		$('#r_email2').show();
	}else{
		$('#r_email2').hide();
	}
	$('#r_email2').val($(val).val());
}

</script>

<form action="./pere204Q.do" method="post" name="form1" id="frmdata">
<div style="display: none;">

p_id<input type="text" name="p_id" value="${paramMap.p_id }">
reservation_dt<input type="text" name="reservation_dt" value="${paramMap.reservation_dt }">

<input type="text" name="r_phone1" id="r_phone1" value="">
<input type="text" name="r_phone2" id="r_phone2" value="">
<input type="text" name="r_phone3" id="r_phone3" value="">
<input type="text" name="sms_chk_data" id="sms_chk_data" value="">



<c:if test="${paramMap.pr_no_cnts !=null && fn:length(paramMap.pr_no_cnts)>0 }">
	<c:forEach var="map1" items="${paramMap.pr_no_cnts}" varStatus="status">
<br/>
pr_no_cnts<input type="text" name="pr_no_cnts" value="${status.index }">
pr_nos<input type="text" name="pr_nos" value="${paramMap.pr_nos[map1] }">

man_cnts<input type="text" name="man_cnts" value="${paramMap.man_cnts[map1] }">
chi_cnts<input type="text" name="chi_cnts" value="${paramMap.chi_cnts[map1] }">
rsv_days<input type="text" name="rsv_days" value="${paramMap.rsv_days[map1] }">

	</c:forEach>
</c:if>

<c:if test="${paramMap.as_no_idxs !=null && fn:length(paramMap.as_no_idxs)>0 }">
	<c:forEach var="map1" items="${paramMap.as_no_idxs}" varStatus="status">
<br/>as_no_idxs<input type="text" name="as_no_idxs" value="${status.index }">
as_nos<input type="text" name="as_nos" value="${paramMap.as_nos[map1] }">
use_cnts<input type="text" name="use_cnts" value="${paramMap.use_cnts[map1] }">
req_msgs<input type="text" name="req_msgs" value="${paramMap.req_msgs[map1] }">
	</c:forEach>
</c:if>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td background="/usr/images/mypage_m01bg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="40%"><img src="/usr/images/res_m01.gif" width="262" height="22"></td>
                <td width="60%" align="right"><%@ include file="/WEB-INF/jsp/usr/pe/re/pere_top.jsp"%></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td height="20" background="/usr/images/res_mbg.gif">&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%">&nbsp;</td>
          <td width="50%" align="right" style="padding-right: 30px;"><table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="70" align="left"><img src="/usr/images/reservation_icon_home.gif" width="47" height="31"></td>
              <td><IMG SRC="${pensionInfo.p_logo }" BORDER="0" height="30"></td>
            </tr>
          </table></td>
        </tr>
      </table>
<%@ include file="/WEB-INF/jsp/usr/pe/re/pere202-3_top.jsp"%>
      
<!-- 예약자 무통장 입금 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="10" height="20" align="right" valign="top"><table
							width="5" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td bgcolor="#60C930" height="10"></td>
							</tr>
						</table></td>
					<td valign="bottom" class="padl5"><strong>예약자 정보</strong></td>
				</tr>
			</table></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td><table width="100%" border="0" cellpadding="0"
				cellspacing="1" bgcolor="#d8d8d8">
				<tr>
					<td width="130" height="3" bgcolor="#60c930"></td>
					<td></td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">예약자명</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><input type="text"
						name="reservation_nm" id="reservation_nm" onkeyup="$('#same_user').attr('checked',false);$('#send_bank_nm').val('');" value=""></td>
				</tr>
<!-- 				<tr> -->
<!-- 					<td height="30" align="center" bgcolor="#ffffff"><table -->
<!-- 							border="0" cellspacing="0" cellpadding="0"> -->
<!-- 							<tr> -->
<!-- 								<td align="center" class="greenb2">휴대폰</td> -->
<!-- 							</tr> -->
<!-- 						</table></td> -->
<!-- 					<td bgcolor="#FFFFFF" class="padl30"><select name="r_phone1" -->
<!-- 						id="r_phone1"> -->
<%-- <c:if test="${code1List !=null && fn:length(code1List)>0 }"> --%>
<%-- 	<c:forEach var="map1" items="${code1List}" varStatus="status"> --%>
<%-- 		<option value="${map1.code }">${map1.code }</option> --%>
<%-- 	</c:forEach> --%>
<%-- </c:if> --%>
<!-- 					</select> - <input name="r_phone2" type="text" id="r_phone2" size="4" -->
<!-- 						maxlength="4" value=""> - <input name="r_phone3" -->
<!-- 						type="text" id="r_phone3" size="4" maxlength="4" value=""> -->
<!-- 						<input type="button" value="휴대폰인증" onclick="check_hphone()"> -->
<!-- 					</td> -->
<!-- 				</tr> -->
			<c:if test="${'Y'==pensionInfo.pickup_yn }">
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">픽업요청</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td>
									<select name="pickup" id="pickup">
											<option value="">픽업장소</option>
										<c:if test="${aList2 !=null && fn:length(aList2)>0 }">
											<c:forEach var="map1" items="${aList2}" varStatus="status">
														<option value="${map1.paa_desc }">${map1.paa_desc }</option>
											</c:forEach>
										</c:if>
									</select>
								</td>
								<td>&nbsp;</td>
								<td>
								<select name="pick_info" id="pick_info">
										<option value="">픽업시간</option>
										<c:if test="${aList3 !=null && fn:length(aList3)>0 }">
											<c:forEach var="map1" items="${aList3}" varStatus="status">
														<option value="${map1.paa_desc }">${map1.paa_desc }</option>
											</c:forEach>
										</c:if>
								</select></td>
								<td>&nbsp;</td>
								<td><input type="checkbox" name="pickup_yn" id="pickup_yn"
									value="Y"></td>
								<td class="paddtop4"><label for="pickup_yn">요청함</label> (<strong>픽업요청</strong>을 하실분은 반드시
									체크해주세요)
								</td>
							</tr>
						</table></td>
				</tr>			
			</c:if>
			<c:if test="${'Y'==pensionInfo.end_time_yn }">
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">펜션도착시간</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td><select name="end_time" id="end_time">
									<option value="">펜션도착시간</option>
									<c:if test="${aList4 !=null && fn:length(aList4)>0 }">
										<c:forEach var="map1" items="${aList4}" varStatus="status">
													<option value="${map1.paa_desc }">${map1.paa_desc }</option>
										</c:forEach>
									</c:if>
								</select></td>
								<td>&nbsp;</td>
								<td class="paddtop4">(<strong>펜션도착</strong> 예정시간을 선택하세요)
								</td>
							</tr>
						</table></td>
				</tr>
			</c:if>
			<c:if test="${'Y'==pensionInfo.email_yn }">
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">E - MAIL</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><input type="text"
						name="r_email1" maxlength="30" value="" style="width: 80px;"
						style="ime-mode:inactive" />@<input type="text" name="r_email2" id="r_email2"
						value=""
						style="width: 100px;" /> <select name=""
						onChange="changeEmail(this)">
							<option value="">직접입력</option>
						<c:if test="${code2List !=null && fn:length(code2List)>0 }">
							<c:forEach var="map1" items="${code2List}" varStatus="status">
								<option value="${map1.code }">${map1.code }</option>
							</c:forEach>
						</c:if>
					</select></td>
				</tr>
			</c:if>
			<c:if test="${'Y'==pensionInfo.start_time_yn }">
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">출발지역</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><input type="text"
						name="start_area" id="start_area" size="30" value=" ">(시,구,군 입력)</td>
				</tr>
			</c:if>
			<c:if test="${'Y'==pensionInfo.etc_req_yn }">
				<tr>
					<td height="60" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">기타요청사항</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><textarea name="etc_req"
							cols="70" rows="3" id="etc_req"></textarea></td>
				</tr>			
			</c:if>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">결제방법</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td><input name="pay_type" type="radio" id="pay_type"
									value="1" checked onclick="chang_paymethod()"></td>
								<td class="paddtop4">무통장입금</td>
								<td>&nbsp;</td>
							</tr>
						</table></td>
				</tr>
			</table></td>
	</tr>
</table>
<div id="div_method_BANK">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td><table border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="10" height="20" align="right" valign="top"><table
								width="5" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td bgcolor="#0099FF" height="10"></td>
								</tr>
							</table></td>
						<td valign="bottom" class="padl5"><strong>무통장 입금</strong></td>
					</tr>
				</table></td>
		</tr>
		<tr>
			<td height="5"></td>
		</tr>
		<tr>
			<td><table width="100%" border="0" cellpadding="0"
					cellspacing="1" bgcolor="#d8d8d8">
					<tr>
						<td width="130" height="3" bgcolor="#0099FF"></td>
						<td></td>
					</tr>
					<tr>
						<td height="30" align="center" bgcolor="#ffffff"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td align="center" class="greenb2">입금은행</td>
								</tr>
							</table></td>
						<td bgcolor="#FFFFFF" class="padl30"><select name="send_bank"
							id="select6">
							<c:if test="${aList1 !=null && fn:length(aList1)>0 }">
								<c:forEach var="map1" items="${aList1}" varStatus="status">
											<option value="${map1.paa_desc }">${map1.paa_desc }</option>
								</c:forEach>
							</c:if>
						</select></td>
					</tr>
					<tr>
						<td height="30" align="center" bgcolor="#ffffff"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td align="center" class="greenb2">입금자명</td>
								</tr>
							</table></td>
						<td bgcolor="#FFFFFF" class="padl30"><table border="0"
								cellspacing="0" cellpadding="0">
								<tr>
									<td><input name="send_bank_nm" type="text" id="send_bank_nm"
										size="6"></td>
									<td>&nbsp;</td>
									<td><input type="checkbox" name="same_user" id="same_user"
										value="Y" onClick="ck_same_user()"></td>
									<td>&nbsp;</td>
									<td class="paddtop4"><label for="same_user">예약자명과 동일</label>(반드시 예약자와 입금자이름이 같아야합니다)</td>
								</tr>
							</table></td>
					</tr>
					<tr>
						<td height="30" align="center" bgcolor="#ffffff"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td align="center" class="greenb2">입금대기시간</td>
								</tr>
							</table></td>
						<td bgcolor="#FFFFFF" class="padl30">- 예약후 <span class="redb">${pensionInfo.wait_time }시간이내</span>
							입금 (시간내 입금이 되지 않으면 자동으로 <span class="redb">예약취소</span> 됩니다)
						</td>
					</tr>
				</table></td>
		</tr>
	</table>
</div>
<div id="div_method_CARD" style="display: none"></div>
<div id="div_method_ONLINE" style="display: none">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td><table border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="10" height="20" align="right" valign="top"><table
								width="5" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td bgcolor="#0099FF" height="10"></td>
								</tr>
							</table></td>
						<td valign="bottom" class="padl5"><strong>실시간계좌이체</strong></td>
					</tr>
				</table></td>
		</tr>
		<tr>
			<td height="5"></td>
		</tr>
		<tr>
			<td><table width="100%" border="0" cellpadding="0"
					cellspacing="1" bgcolor="#d8d8d8">
					<tr>
						<td width="130" height="3" bgcolor="#0099FF"></td>
						<td></td>
					</tr>
					<tr>
						<td height="30" align="center" bgcolor="#ffffff"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td align="center" class="greenb2">입금은행</td>
								</tr>
							</table></td>
						<td bgcolor="#FFFFFF" class="padl30"><select name="select8"
							id="select8">
								<option>국민은행 522301-01-235047 최창희(웹이벤트몰)</option>
						</select></td>
					</tr>
					<tr>
						<td height="30" align="center" bgcolor="#ffffff"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td align="center" class="greenb2">입금자명</td>
								</tr>
							</table></td>
						<td bgcolor="#FFFFFF" class="padl30"><table border="0"
								cellspacing="0" cellpadding="0">
								<tr>
									<td><input name="textfield10" type="text" id="textfield10"
										size="6"></td>
									<td>&nbsp;</td>
									<td><input type="checkbox" name="checkbox4" id="checkbox4"></td>
									<td>&nbsp;</td>
									<td class="paddtop4">예약자명과 동일 (반드시 예약자와 입금자이름이 같아야합니다)</td>
								</tr>
							</table></td>
					</tr>
					<tr>
						<td height="30" align="center" bgcolor="#ffffff"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td align="center" class="greenb2">입금대기시간</td>
								</tr>
							</table></td>
						<td bgcolor="#FFFFFF" class="padl30">- 예약후 <span class="redb">12시간이내</span>
							입금 (시간내 입금이 되지 않으면 자동으로 <span class="redb">예약취소</span> 됩니다)
						</td>
					</tr>
				</table></td>
		</tr>
	</table>
</div>
<!-- 예약자 무통장 입금 끝 -->
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center"><table width="100" border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td><a href="javascript:history.go(-1)"><img src="/camping/img/reservation_bt02.jpg" width="114" height="36"></a></td>
                <td>
                	<a href="#" onclick="sendData();return false;"><img src="/usr/images/res_btn_next.gif" width="114" height="36"></a>
                </td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td align="center">&nbsp;</td>
        </tr>
        <tr>
          <td height="3" bgcolor="#86ad29"></td>
        </tr>
        <tr>
          <td style="padding-top: 2px;"><%@ include file="/WEB-INF/jsp/usr/pe/re/footer.jsp"%></td>
        </tr>
      </table></td>
  </tr>
</table>

</form>

